package com.ft.oa.domain.project;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ft.oa.domain.dto.knowledgeBase.AttachmentDto;
import com.ft.oa.utils.SecurityUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 公司资质维护实体
 * @author liyansheng
 * @ClassName CompanyQualification
 * @date 2022-1-5 15:49:09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "company_qualification",autoResultMap = true)
public class CompanyQualification {

    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 资质名称
     */
    private String name;

    /**
     * 类型
     */
    private String type;

    /**
     * 所属
     */
    private String belongsTo;

    /**
     * 说明
     */
    private String sow;

    /**
     *  附件
     */
    private String files;

    /**
     *  tab功能分类
     */
    private String tabType;

    /**
     *  tab功能分类
     */
    private String dellcompany;

    /**
     * 创建人id
     */
    private Long creator = SecurityUtils.getCurrentUser().getId();

    /**
     * 创建时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime = LocalDateTime.now();

    /**
     * 修改人id
     */
    private Long editor = SecurityUtils.getCurrentUser().getId();

    /**
     * 修改时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime = LocalDateTime.now();

    @TableField(exist = false)
    private List<AttachmentDto> attachments;

    private String achment;

}
